package com.zjt;

/**
 * 边，不存储出发点，因为边存储在出发点中
 */
public class Edge {
    /**
     * 目的节点
     */
    private final Node dts;

    /**
     * 权值
     */
    private final double weight;

    /**
     * 方向，1代表正向，-1代表负向
     */
    private final int direction;

    /**
     * @param dts destination Node
     * @param w   weight
     */
    public Edge(Node dts, double w, int direction) {
        this.dts = dts;
        this.weight = w;
        this.direction = direction;
    }

    public Node getDts() {
        return dts;
    }

    public double getWeight() {
        return weight;
    }

    public int getDirection() {
        return direction;
    }
}
